package com.itheima.类和对象;

//定义手机类
public class Phone {
    String brand;
    private int price;

    public void setPrice(int a) {
        if (a >= 8000 || a <= 500) {
            System.out.println("无该价位手机");
        } else {
            price = a;
        }
    }

    public int getPrice() {
        return price;
    }

    public void call(String name) {
        System.out.println("打电话给" + name);
    }

    public void show() {
        System.out.println(price + " " + brand);
    }
}
